package com.financing.platform.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFpShopSubjectUserDao;
import com.financing.platform.dto.FpShopSubjectUserDTO;
import com.financing.platform.util.SqlName;
/**
 * fp_shop_subject_user  
 * 用户答题表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpShopSubjectUserDao")
public class FpShopSubjectUserDaoImpl extends BaseDaoImpl implements IFpShopSubjectUserDao {


	@Override
	public int insert(FpShopSubjectUserDTO fpShopSubjectUser) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.FpShopSubjectUserSql.insert, fpShopSubjectUser);
	}

	@Override
	public void update(FpShopSubjectUserDTO fpShopSubjectUser) throws SQLException {
		this.sqlMapClient.update(SqlName.FpShopSubjectUserSql.update, fpShopSubjectUser);
	}

	@Override
	public void updateForce(FpShopSubjectUserDTO fpShopSubjectUser) throws SQLException {
		this.sqlMapClient.update(SqlName.FpShopSubjectUserSql.updateForce, fpShopSubjectUser);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.FpShopSubjectUserSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpShopSubjectUserDTO> queryList(FpShopSubjectUserDTO fpShopSubjectUser) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.FpShopSubjectUserSql.queryList, fpShopSubjectUser);
	}

	@Override
	public int queryListCount(FpShopSubjectUserDTO fpShopSubjectUser) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.FpShopSubjectUserSql.queryListCount, fpShopSubjectUser);
	}

	@Override
	public FpShopSubjectUserDTO loadById(Integer id) throws SQLException {
		return  (FpShopSubjectUserDTO)this.sqlMapClient.queryForObject(SqlName.FpShopSubjectUserSql.loadById,id);
	}

 	
}
